package cn.chen.数据结构.二叉树.平衡二叉树;

public class AVLTreeTest {

    public static void main(String[] args){

        BalancedBinaryTree tree=new BalancedBinaryTree();

//        int[] a={4,3,6,5,7,8};
        int[] a={10,12,7,6,8,9};
        for(int i=0;i<a.length;i++)
            tree.addNode(new AVLNode(a[i]));

        // 中序遍历
        tree.midOrder();

        System.out.println("树高度："+tree.height(tree.root));
        System.out.println("左子树高度："+tree.height(tree.root.left));
        System.out.println("右子树高度："+tree.height(tree.root.right));
    }
}
